package cn.snowheart.strategy.order.service;

import cn.snowheart.strategy.order.entity.OrderDTO;
import cn.snowheart.strategy.order.handler.HandlerContext;
import cn.snowheart.strategy.order.handler.IOrderHandler;

/**
 * @author liuwanxiang
 * @version 2019/06/24
 */
public class OrderServiceV2Impl implements IOrderService {
    @Override
    public String handle(OrderDTO order) {
        IOrderHandler handler = HandlerContext.getHandler(order.getType());
        return handler.handle(order);
    }
}
